<?php
class Date
{
	private $timestamp = null;
	
	public function __construct($strDate = 'now')
	{
		$this->timestamp = strtotime($strDate);
	}
	
	public function add($strDate) { $this->timestamp = strtotime($strDate,$this->timestamp); return $this; }
	public function set($strDate) { $this->timestamp = strtotime($strDate); return $this; }
	
	public function format($format)
	{
		return date($format,$this->timestamp);
	}
	
	public function __tostring()
	{
		return $this->format("Y-m-d H:i:s");
	}
}